/**
 * build_project
 * <p>
 * Copyright 2014 cayden.cn, Inc. All rights reserved.
 *
 * @author Administrator
 * @date 2021-06-22 11:07
 */
package com.cayden.config.log.initializer;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import com.cayden.config.log.LogbackConfigurator;

/**
 *
 * @author cayden
 * @date 2021-06-22 11:07
 */
public class AutoConfigurationReportLogInitializer extends AbstractLogInitializer {

    @Override
    public void init(LogbackConfigurator configurator) {
        String fileName = "autoconfig-10dt.log";
        configurator.log("设置AUTO-CONFIG日志，日志文件为:%s", fileName);
        Appender<ILoggingEvent> appender =
                configurator.fileAppender(
                        "AUTO-CONFIG", "%d{yyyy-MM-dd HH:mm:ss.SSS} - %msg%n", fileName, 1);
        configurator.logger("AutoConfigurationReportLoggingInitializer", Level.DEBUG, false, appender);
    }

}
